package com.tengju.bff.interfaces.app.withdraw.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

/**
 * 绑卡 - 鉴权中间页信息
 *
 * @author 大木
 * @date 2021/12/16
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "AuthPublicAccountInfoVO", description = "鉴权页面信息")
public class AuthPublicAccountInfoVO {

    @ApiModelProperty(value = "银行卡信息")
    String bankCardDesc;

    @ApiModelProperty(value = "银行卡号")
    String cardNo;

    @ApiModelProperty(value = "手机号信息")
    String mobileDesc;

    @ApiModelProperty(value = "剩余时间（秒）")
    Long remainSecond;

    @ApiModelProperty(value = "申请按钮展示：1-确认验证, 2-重新申请, 默认为 1")
    Integer buttonView = 1;

    @ApiModelProperty(value = "提示信息")
    String hintMsg;

    public void formatSetCardNo(String cardNo) {
        this.cardNo = cardNo;
        this.bankCardDesc =  "银行卡尾号(" + StringUtils.substring(cardNo, cardNo.length() - 4) + ")";
    }

    public void formatMobile(String mobile) {
        this.mobileDesc =  "手机尾号" + StringUtils.substring(mobile, mobile.length() - 4);
    }


}
